<?php $this->load->view('view_pageheader'); ?>
    <label class="content_linkBack"><?php echo anchor('con_users', '< Back') ?></label>
    <label class="content_this">| GROUP MENU MANAGER</label>
    
    <style type="text/css">
    table.register {
        margin: auto;
        margin-top: 5px;
        border: #010101 solid 1px;
        border-left-style: none;
        border-right-style: none;
        text-align: center;
        padding: 5px 5px;
        
    }
    table.register th {
        color: #000;
        border: #ecebeb solid 1px;
    }
    table.register td {
        border: #ecebeb solid 1px;
    }
    table.register tr:hover {
        background-color: #ffcc99;
    }
    table.register tr td > a {
        cursor: pointer;
    }
</style>
<div style="border: red hidden 1px; width: 100%;">
    <table border="0" cellpadding="5" class="register">
        <tr style="text-align: right; background: #fff;">
            <td colspan="8">
                <form action="Menu" id="select_type" name="select_type" method="post">
                    <label>เลือกรูปแบบการแสดง : </label>
                    <select id="select_type" name="select_type" onchange="">
                        <option value="-1">Choose...</option>
                        <option value="0">Non-Active</option>
                        <option value="1">Active</option>
                        <option value="2">Default</option>
                    </select>
                </form>
            </td>
            <td>
                <div align="right">
                <a href="New_gmenu"><img src="../../images/add.png" /></a>
                </div>
            </td>
        </tr>
        <tr style="background-color: #fff">
            <th>ID</th>
            <th colspan="3" style="width: 300px">GROUP-MENU NAME</th>
            <th colspan="2" style="width: 150px">POSITION</th>
            <th>ACTIVE</th>
            <th>EDIT</th>
            <th>DELETE</th>
        </tr>
        <?php foreach ($gmenu as $testing) { ?>
        <tr>  
            <td><?echo $testing->gmenu_id."<br />";?></td>
            <td colspan="3" style="width: 300px"><?echo $testing->gmenu_name."<br />";?></td>
            <td colspan="2" style="width: 150px"><?echo $testing->position."<br />";?></td>
            <form action="group_menu" id="activegmenu" name="activegmenu" method="post">
            <td>
            <? if(($testing->active)!=1) {?>
                <input type="image" <? echo  img('images/check_false.png');?>
                <input type="hidden" name="activegmenu" value="<? echo $testing->active.$testing->gmenu_id; ?>"  />
            <? } else {?>
                <input type="image" <? echo  img('images/check_true.png');}?> 
                <input type="hidden" name="activegmenu" value="<? echo $testing->active.$testing->gmenu_id; ?>" />      
            </td>
            </form>
            <form action="edit_gmenu" name="editgmenu" method="post">
            <td><div align="center" >
                <input type="image" <? echo  img('images/edit.png');?> 
                <input type="hidden" name="editgmenu" value="<? echo $testing->gmenu_id; ?>" />         
            </div></td>
            </form>
            <form action="group_menu" name="deletegmenu" method="post">
            <td>
                <input type="image" <? echo  img('images/trash.png');?> 
                <input type="hidden" name="deletegmenu" value="<? echo $testing->gmenu_id; ?>" />
            </td>
            </form>
        <? } ?>
        </tr> 
    </table>
</div>
<?php $this->load->view('view_pagefooter'); ?>
